package com.lw.yygh.model.user;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;


import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * Patient
 * </p>
 *
 * @author qy
 */
@Data
@TableName("patient")
public class Patient  {
	
	private static final long serialVersionUID = 1L;

	@TableId(type = IdType.AUTO)
	private Long id;
	
	//用户id
	@TableField("user_id")
	private Long userId;

	//姓名
	@TableField("name")
	private String name;

	//证件类型
	@TableField("certificates_type")
	private String certificatesType;

	//证件编号
	@TableField("certificates_no")
	private String certificatesNo;

	//性别
	@TableField("sex")
	private Integer sex;

	//出生年月
	@JsonFormat(pattern = "yyyy-MM-dd")
	@TableField("birthdate")
	private Date birthdate;

	//手机
	@TableField("phone")
	private String phone;

	//是否结婚
	@TableField("is_marry")
	private Integer isMarry;

	//省code
	@TableField("province_code")
	private String provinceCode;

	//市code
	@TableField("city_code")
	private String cityCode;

	//区code
	@TableField("district_code")
	private String districtCode;

	//详情地址
	@TableField("address")
	private String address;

	//联系人姓名
	@TableField("contacts_name")
	private String contactsName;

	//联系人证件类型
	@TableField("contacts_certificates_type")
	private String contactsCertificatesType;

	//联系人证件号
	@TableField("contacts_certificates_no")
	private String contactsCertificatesNo;

	//联系人手机
	@TableField("contacts_phone")
	private String contactsPhone;

	//是否有医保
	@TableField("is_insure")
	private Integer isInsure;

	//就诊卡
	@TableField("card_no")
	private String cardNo;

	//状态（0：默认 1：已认证）
	@TableField("status")
	private String status;

	@TableField(fill = FieldFill.INSERT)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	@TableField(fill = FieldFill.INSERT_UPDATE)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	@TableLogic
	@TableField(fill = FieldFill.INSERT)
	private Integer isDeleted;

	@TableField(exist = false) //被该注解标注的，将不会被录入到数据库中。只作为普通的javaBean属性
	private Map<String,Object> param = new HashMap<>();
}

